import baseurl from './env'
import request from './req'
import {AccountDetailDto, AccountDetailReqDto, PageDto, PageReqDto, PageResDto} from './type'

// 用户相关

// 获取手机登录验证码
export const getlogincodeapi = async (data: any) => {
    const res = await request.post('api/v1/send-verify-code', data)
    return res
}

// 获取员工用户信息
export const getusermsginfoapi = async (userId: number) => {
    const res = await request.get('/system/user/get-user-info?userId=' + userId)
    return res
}

// 登录获取用户信息
export const getuserinfoapi = async () => {
    const res = await request.get('/getInfo')
    return res
}


// 新增用户
export const adduserapi = async (data: any) => {
    const res = await request.post('/system/user', data)
    return res
}

// 登陆接口
export interface ApifoxModel {
    code: string;
    password: string;
    username: string;
    uuid: string;
}

export const userlogin = async (data: any) => {
    const res = await request.post('/login', data)
    return res
}

// 获取登录验证码图片接口
export interface loginimg {
    code: number
    img: string
    msg: string
    uuid: string
}

export const getloginimg = async () => {
    const res: loginimg = await request.get('/captchaImage')
    return res
}

// 获取路由接口
export const getrouter = async () => {
    const res = await request.get('/2/getRouters')
    return res
}

// 获取菜单树
export const getmenutreeapi = async (roleid: any) => {
    const userid = sessionStorage.getItem('userid')
    const res = await request.get('system/menu/roleMenuTreeselect/' + roleid + '/' + userid)
    return res
}

// 新增角色
export const addroleapi = async (data: any) => {
    const res = await request.post('/system/role', {...data})
    return res
}

// 修改角色
export const changeroleapi = async (data: any) => {
    const res = await request.put('/system/role', {...data})
    return res
}

// /system/dept/{deptId}修改组回填信息查询
export const getbmdetailapi = async (deptId: any) => {
    const res = await request.get(`/system/dept/${deptId}`)
    return res
}

// 删除角色
export const delrolesapi = async (id: any) => {
    const res = await request.delete('/system/role/' + id)
    return res
}

// 查询角色
export const getrolesapi = async () => {
    const res = await request.get('system/role/list', {
        noCancel: true
    })
    return res
}

// 根据角色id获取详细信息
export const getrolesdetailapi = async (roleId: any) => {
    const res = await request.get('/system/role/' + roleId)
    return res
}


// 部门相关

// 获取部门树
export const getdepartmentapi = async () => {
    const res = await request.get('system/dept/treeselect', {
        noLoading: true,
        noCancel: true
    })
    return res
}
// 只获取商务人员
export const getdepartmentapic = async () => {
    const res = await request.get('/crm/sales/query-dept-staff')
    return res
}

// 修改部门
export const changedepartmentapi = async (data: any) => {
    const res = await request.put('system/dept', data)
    return res
}

// 新增部门
export const adddepartmentapi = async (data: any) => {
    const res = await request.post('system/dept', data)
    return res
}

// 删除部门
export const deldepartmentapi = async (id: any) => {
    const res = await request.delete('system/dept/' + id)
    return res
}

// 根据部门获取部门下用户信息
export const getdepartmentuserapi = async (data: any) => {
    if (data.deptId) {
        const res = await request.get(`system/user/list?pageNum=${data.pageNum}&pageSize=${data.pageSize}&deptId=${data.deptId}&searchText=${data.searchText}`, {
            noLoading: true
        })
        return res
    } else {
        const res = await request.get(`system/user/list?pageNum=${data.pageNum}&pageSize=${data.pageSize}&searchText=${data.searchText}`, {
            noLoading: true
        })
        return res
    }
}


// 修改用户
export const changeuserapi = async (data: any) => {
    const res = await request.put('/system/user', {...data})
    return res
}

// 移除用户所属部门
export const removeuserapi = async (data: any) => {
    const res = await request.post('/crm/sales/remove-crm-user', {userId: data.userId})
    return res
}

// 根据用户id获取业绩相关
export const getperformanceapi = async (data: any) => {
    const res = await request.get(`/crm/rate/record/sales-royalty-rate?userId=${data.userId}&startTime=${data.startTime}&endTime=${data.endTime}`)
    return res
}

// 根据用户id获取工作信息
export const getjobmsgapi = async (data: any) => {
    const res = await request.get(`/system/record/operate_record-list?userId=${data.userId}&type=${data.type}`)
    return res
}

// 获取销售人员
export const getmarketapi = async () => {
    const res = await request.get('/crm/sales/querySales?auditStatus=1')
    return res
}

// 获取crm用户信息(销售信息)
export const getcrmuserapi = async (auditStatus: any) => {
    const res = await request.get('crm/sales/querySales?auditStatus=' + auditStatus, {
        noCancel: true
    })
    return res
}

// 获取crm员工工资单
export const getpayrolllistapi = async (data: any) => {
    const res = await request.get(`/crm/sales/get-payroll?searchText=${data.searchText}&queryTime=${data.queryTime}&pageSize=${data.pageSize}&pageNum=${data.pageNum}`)
    return res
}

// 获取新增用户部门及角色信息
export const getnewdepartmentapi = async () => {
    const res = await request.get('/system/post/optionselect', {
        noCancel: true
    })
    return res
}

// 导出员工账单
export const exportpayrollapi = async (data: any) => {
    const res = await request.get('/crm/sales/export-payroll?queryMonth=' + data)
    return res
}

// 根据用户获取菜单列表
export interface systemmenutype {
    code: number;
    data: Datum[];
    msg: string;
}

export interface Datum {
    children: DatumChild[];
    id: number;
    label: string;
}

export interface DatumChild {
    children: PurpleChild[];
    id: number;
    label: string;
}

export interface PurpleChild {
    children: FluffyChild[];
    id: number;
    label: string;
}

export interface FluffyChild {
    id: number;
    label: string;
}

export const getsystemmenuapi = async (data: systemmenutype) => {
    const res = await request.get('/system/menu//treeselect', {...data})
    return res
}

// 保险对账相关

// 保司对账月初预付
export const getmonthstartapi = async (month: string) => {
    const res = await request.get('/period-insur/record/ReconciliationInfo?month=' + month)
    return res
}

// 保司对账月末结算
export const getmonthendapi = async (month: string) => {
    const res = await request.get('/rest/period-insur/staff-record/query-end-month-reconciliation?month=' + month)
    return res
}

// 保司对账月初预付导出execl表格
export interface getexecltype {
    exportMonth: string,
    insurCompany: string
}

export const getmonthstartexcelapi = async (data: getexecltype) => {
    const res = await request.get(`/rest/period-insur/ensure-cost/exportEarlyEnsureCost?exportMonth=${data.exportMonth}&insurCompany=${data.insurCompany}`)
    return res
}

// 保司对账月末结算导出execl表格
export const getmonthendexcelapi = async (data: getexecltype) => {
    const res = await request.get(`/period-insur/staff-record/CRM/exportPeriodList?exportMonth=${data.exportMonth}&insurCompany=${data.insurCompany}`)
    return res
}


// 发薪相关

// 获取领薪状态
export const getpaymentapi = async (recordId: any) => {
    const res = await request.get('/pay-payment-record-log/salary-detail/?recordId=' + recordId)
    return res
}

// 客户管理相关

// 客户列表管理
export interface clientstype {
    companyName?: string,
    auditStatus?: string,
    adminName?: string | number,
    pageSize?: number,
    pageNum?: number,
}

export const getYGCompanyList = async (data: any) => {
    const res = await request.get('/insur/com/yg/company/query-yg-company', {params: data})
    return res
}

/**
 * 获取真实的客户数据
 *
 * @param data 请求参数
 * @returns 返回自定义列表的响应结果
 */
export const getclientsapi = async (data: any) => {
    //    接口路径更改 9/29
    const res = await request.get('/saas/note/saasCompany/custom-list', {params: data})
    return res
}

// 客户充值续费管理
export interface clientrechargetype {
    productType?: string | number,
    companyName?: string,
    pageSize?: number,
    pageNum?: number,
    status?: number | string,
    operationType?: number | string,
    payMode?: number | string,
    queryStartDate?: string,
    queryEndDate?: string,
}

export const getclientrechargeapi = async (data: clientrechargetype) => {
    const res = await request.get('/saas/note/saasCompany/recharge-record-list', {params: data})
    return res
}

// 导出客户充值列表
export const getclientpayexcelapi = async () => {
    const res = await request.get('/saas/note/saasCompany/export-recharge')
    return res
}

// 子弹发薪充值审核
export interface bulletpayrolltype {
    id?: number | string,
    companyId?: number | string,
    status?: number | string,
    payMode?: number | string,
    remark?: string,
    receiptId?: string | number
}

export const getbulletpayrollapi = async (data: any) => {
    const res = await request.post('/payAccount/rechargeRecord/recharge-handle', data)
    return res
}

// 电子签充值审核
export interface electronicvisaaudittype {
    id?: number | string,
    companyId?: number | string,
    status?: number | string,
    payMode?: number | string,
    receiptId?: number | string,
    remark?: string
}

export const getelectronicvisaauditapi = async (data: electronicvisaaudittype) => {
    const res = await request.put('/elesign/ele-sign-recharge-record', data)
    return res
}

// 日日保充值审核
export interface everydayinsuranceaudittype {
    id?: string | number,
    companyId?: string | number,
    remark?: string,
    payMode?: string | number,
    receiptId?: string | number,
    operateFlag?: string | number,
}

export const geteverydayinsuranceauditapi = async (data: everydayinsuranceaudittype) => {
    const res = await request.put(`/wesure/handle/confirm-recharge?id=${data.id}&companyId=${data.companyId}&remark=${data.remark}&payMode=${data.payMode}&receiptId=${data.receiptId}&operateFlag=${data.operateFlag}`)
    return res
}

// 长期保充值审核
export interface longtimeinsuranceaudittype {
    id?: string | number,
    companyId?: string | number,
    remark?: string,
    payMode?: string | number,
    receiptId?: string | number,
    operateFlag?: string | number,
}

export const getlongtimeinsuranceauditapi = async (data: longtimeinsuranceaudittype) => {
    const res = await request.put('/period-insur/recharge-handle/confirm-recharge', data)
    return res
}

// 群发消息充值审核
export interface messageaudittype {
    id?: string | number,
    companyId?: string | number,
    remark?: string,
    payMode?: string | number,
    receiptId?: string | number,
    operateFlag?: string | number,
}

export const getmessageauditapi = async (data: messageaudittype) => {
    const res = await request.put(`/mass/massMessageRechargeRecord/confirm-recharge?id=${data.id}&companyId=${data.companyId}&remark=${data.remark}&payMode=${data.payMode}&receiptId=${data.receiptId}&operateFlag=${data.operateFlag}`)
    return res
}

// 获取充值账户接口
export const getadminrechargeapi = async (companyId: any) => {
    const res = await request.get('/saas/note/receipt-info/get-collection-account/' + companyId)
    return res
}

// 客户详情头部信息
export const getclientsdetailapi = async (companyId: any) => {
    const res = await request.get('/saas/note/saasCompany/query-company-info/' + companyId)
    return res
}

// 客户详情-子弹发薪信息
export const getbulletpayrollmsgapi = async (companyId: any) => {
    const res = await request.get('/saas/note/saasCompany/query-pay-info/?companyId=' + companyId, {
        noLoading: true
    })
    return res
}

// 客户详情-电子签信息
export const getelectronicvisaauditmsgapi = async (companyId: any) => {
    const res = await request.get('/saas/note/saasCompany/query-ele-info/' + companyId)
    return res
}
// 客户详情-日日保信息
export const geteverydayinsuranceauditmsgapi = async (companyId: any) => {
    const res = await request.get(`/saas/note/saasCompany/query-wesure-info/?companyId=${companyId}`)
    return res
}

// 客户详情-长期保信息
export const getlongtimeinsuranceauditmsgapi = async (companyId: any) => {
    const res = await request.get('/saas/note/saasCompany/query-period-info/' + companyId)
    return res
}
// 客户详情-群发消息信息
export const getmassmessagemsgapi = async (companyId: any) => {
    const res = await request.get(`/saas/note/saasCompany/query-message-info/${companyId}`)
    return res
}

// 获取长期保保险方案列表
export const getlongtimeinsuranceaudittypeapi = async (insureCompany: any) => {
    const res = await request.get('/insur/insurComInsuranceCompany/query-period-company-solution?insureCompany=' + insureCompany, {
        noCancel: true
    })
    return res
}
export const getlongtimeinsuranceaudittypeapic = async (data: any) => {
    // let res = await request.get('/insur/insurComInsuranceCompany/query-period-company-solution',{params:data})
    const res = await request.get('/insur/insurComInsuranceCompany/query-period-company-solution-company', {params: data})
    return res
}
// 获取长期保保司列表
export const getlongtimeinsuranceaudicompanytapi = async () => {
    const res = await request.get('/insur/insurComInsuranceCompany/query-period-insurance-company')
    return res
}

// 获取日日保保司列表
export const geteverydayinsuranceaudicompanytapi = async () => {
    const res = await request.get('/insur/insurComInsuranceCompany/query-daily-insurance-company')
    return res
}

// 获取日日保方案列表
export const geteverydayinsuranceaudittypeapi = async (insureCompany: any) => {
    const res = await request.get('/insur/insurComInsuranceCompany/query-daily-company-solution?insureCompany=' + insureCompany)
    return res
}

// 获取全部销售信息
export const getallsellerapi = async () => {
    const res = await request.get('/crm/sales/querySales?auditStatus=1')
    return res
}

// 获取团队成员信息
export const getteamapi = async (data: any) => {
    const res = await request.get('/pay/pay-manager-user/get-team-members', {params: data})
    return res
}

// 子弹发薪续费充值
export const bulletpayrechargeapi = async (data: any) => {
    const res = await request.post('/payAccount/rechargeRecord/recharge', data)
    return res
}

// 电子签新增充值
export const elerechargeapi = async (data: any) => {
    const res = await request.put('/elesign/ele-sign-recharge-record/ele-sign-amount-recharge', data)
    return res
}
// 长期保新增充值
export const longrechargeapi = async (data: any) => {
    const res = await request.put('/saas/note/saasCompany/period-recharge-account-balance', data)
    return res
}
// 日日保新增充值
export const everyrechargeapi = async (data: any) => {
    const res = await request.put('/saas/note/saasCompany/recharge-account-balance', data)
    return res
}
// 群发消息新增充值
export const messagerechargeapi = async (data: any) => {
    const res = await request.put('/mass/massMessageRechargeRecord/recharge-account-balance', data)
    return res
}

// 开通PC按钮
export const openpcapi = async (data: any) => {
    const res = await request.post('/system/user/open-login-pc', data)
    return res
}

// 设置/取消超级管理员按钮
export const setorcanceladminapi = async (data: any) => {
    const res = await request.post('/pay/pay-manager-user/set-admin', data)
    return res
}

// 禁止/允许登陆操作
export const okornologinapi = async (data: any) => {
    const res = await request.put('/pay/pay-manager-user/change-login-pc-status', data)
    return res
}

// 团队修改角色按钮
export const changeteamroleapi = async (data: any) => {
    const res = await request.post('/system/user/change-user-role', data)
    return res
}

// 重置密码操作
export const resetpasswordapi = async (data: any) => {
    const res = await request.put('/pay/pay-manager-user/resetPwd', data)
    return res
}

// 重置pc密码操作
export const resetpasswordapipc = async (data: any) => {
    const res = await request.put('/system/user/resetPwd', data)
    return res
}

// 客户详情信息修改
export const changeclientdetailmsgapi = async (data: any) => {
    const res = await request.put('/saas/note/saasCompany', data)
    return res
}

// 客户详情修改销售
export const changemarketapi = async (data: any) => {
    const res = await request.put('/crm/deal/edit-contact', data)
    return res
}

// 客户详情第一次设置销售
export const setmarketapi = async (data: any) => {
    const res = await request.put('/crm/deal/set-contact', data)
    return res
}

export interface ditchListDto {
    id: number;
    name: string;
    auditStatus: number;
    contacts: null | string;
    area: null | string;
    phone: string;
    isOpenPc: number;
    dataScope: number | null;
    type: number;
    createTime: Date;
    createUserId: number;
    updateTime: null | string;
    updateUserId: number | null;
    params?: object;
    saasReceiptAccountInfoList: null;
}

// 获取渠道接口
export const getditchapi = async (): Promise<ditchListDto[]> => {
    return request.get('/crm/channel/queryChannel?type=1', {
        noCancel: true
    })
}

// 查询群发消息列表
export const getmassmessageapi = async (data: any) => {
    const res = await request.get(`/mass/massMessage/query-massMessage-list?companyId=${data.companyId}&pageSize=${data.pageSize}&pageNum=${data.pageNum}`, data)
    return res
}

// 查询公司列表
export const getcompanyapi = async (companyName: any) => {
    const res = await request.get(`/saas/note/saasCompany/comb-co-info?companyName=${companyName}`)
    return res
}


// 查询审核通过公司列表
export const getpassedcompanyapi = async (data: any) => {
    const res = await request.get(`/saas/note/saasCompany/comb-co-info`,{params:data})
    return res
}

// 查询审核通过公司列表
export const queryServeCompanyListApi = async (data: any) => {
    const res = await request.get(`admin/company/query-serve-company-list`,{params:data})
    return res
}

// 查询派遣单位列表
export const getDispatchingAgencyapi = async (serveCompanyName: any) => {
    const res = await request.get(`/period-insur/serve-company/comb-svc-list?serveCompanyName=${serveCompanyName}`)
    return res
}

// 长期保报案理赔列表
export const getlongbalpapi = async (data: any) => {
    const res = await request.get('/period-insur/report-case/list', {
        params: data
    })
    return res
}
// 长期保案件设置
export const longinsurecasesetapi = async (data: any) => {
    const res = await request.put('/period-insur/report-case', data)
    return res
}
// 查询日保报案列表
export const getdaybalpapi = async (data: any) => {
    const res = await request.get('/wesure/wesure-report-case/report-case-list', {
        params: data
    })
    return res
}
// 日日保案件设置1
export const dayinsurecasesetapione = async (data: any) => {
    const res = await request.put('/wesure/wesure-report-case', data)
    return res
}
// 日日保案件设置2
export const dayinsurecasesetapitwo = async (data: any) => {
    const res = await request.put('/wesure/wesure-report-case/add-report-result', data)
    return res
}

// 获取日日保企业列表
export const getdayinsurecompanylistapi = async (data: any) => {
    const res = await request.get(`/admin/company/list-audit?productType=${data.productType}&insureCompanyType=${data.insureCompanyType}&auditStatus=${data.auditStatus}&companyId=${data.companyId}&serveCompanyName=${data.serveCompanyName}&pageNum=${data.pageNumber}&pageSize=${data.pageSize}`)
    return res
}

// 日保修改行业获取行业
export const getdayinsurejoblistapi = async (data: any) => {
    const res = await request.get(`/wesure/wesure-industry/list?productType=${data.productType}&isDelete=${data.isDelete}`)
    return res
}

// 日日保审核派遣单位信息
export const dayinsurecheckdispatchingAgencyapi = async (data: any) => {
    const res = await request.put('/admin/company/audit-wesure-time', data)
    return res
}

// 日日保团意保修改行业
export const changedayandteamhyapi = async (data: any) => {
    const res = await request.put('/admin/company/update-gsc-industry', data)
    return res
}

// 获取长期保派遣单位列表
export const getlonginsurecompanylistapi = async (data: any) => {
    const res = await request.get('/period-insur/serve-company/query-svc-occ', {params: data})
    return res
}

// 获取长期保派遣单位详情
export const getcompanyDetailById = async (id: number) => {
    const res = await request.get(`/period-insur/serve-company/query-svc-occ/${id}`)
    return res
}


// 获取长期保工种列表
export const getlongjoblistapi = async (data: any) => {
    const res = await request.get('/period-insur/industry/list', {params: data})
    return res
}

// 长期保派遣单位审核
export const longdispatchingagencycheckapi = async (data: any) => {
    const res = await request.post('/period-insur/serve-company/updateStatus', data)
    return res
}

// 长期保上传视频
export const longuploadvideoapi = async (data: any) => {
    const res = await request.post('/rest/period-insur/serve-company/upload', data)
    return res
}


// 长期保上传视频
export const uploadZipOldApi = async (data: any) => {
    const res = await request.post('/saas/invoice/uploadZip-old?id=0', data)
    return res
}

// 新增派遣单位视频文件
export const longaddvideoapi = async (data: any) => {
    const res = await request.post('/rest/period-insur/serve-company/insert-serveCompany-file', data)
    return res
}

export interface ditchSkAdminListDto {
    list: ditchSkAdminItemDto[];
    totalCount: number;
    hasNextPage: boolean;
}

export interface ditchSkAdminItemDto {
    id: number;
    bankName: string;
    bankNo: null | string;
    openBank: null | string;
    appId: null | string;
    wechatMchId: string;
    isDelete: number;
    wechatMchKey: null | string;
    createTime: number;
    alipayMchId: null;
    updateTime: number;
    alipayMchKey: null;
    createUser: number;
    updateUser: number;
    params: object;
    bankNameAbbreviation: string;
    orderNumber: number;
    channelId: null | string;
    maxRcptAmount: number | null;
    maxInvoiceAmount: number | null;
    isNotify: null;
    notifyAmt: number | null;
    qyWxQrcode: null;
    keyPath: null | string;
    privateCertPath: null | string;
    privateKeyPath: null | string;
    apiKey: null | string;
    yearMonth: null;
    channelName: null | string;
}

// 根据渠道获取收款账户列表
export const getditchskadminapi = async (channelId: any, option: any = {}):Promise<ditchSkAdminListDto> => {
    const res = await request.get(`/saas/note/receipt-info/list?channelId=${channelId}&pageSize=999`, {...option})
    return res
}
// 获取收款账户列表
export const getalladminapi = async () => {
    const res = await request.get('/saas/note/receipt-info/list')
    return res
}
// 客户详情基本信息导出
export const derivebasemsgapi = async (id: any) => {
    const res = await request.get(`/saas/note/saasCompany/export-company-info?id=${id}`)
    return res
}

// 客户列表信息导出
export const exportcompanylistapi = async (ids: any) => {
    const res = await request.get(`/saas/note/saasCompany/export-company-info?ids=${ids}`)
    return res
}

// 账户明细列表
export const getzhmxlistapi = async (data: any) => {
    const res = await request.get(`/saas/note/saasCompany/query-account-details?companyId=${data.companyId}&payMode=${data.payMode}&productType=${data.productType}&type=${data.type}&pageSize=${data.pageSize}&pageNum=${data.pageNum}`, {
        noLoading: true
    })
    return res
}

// 账户明细列表
export const cgetzhmxlistapi = async (data: AccountDetailReqDto & PageReqDto) => {
    return request.get('/saas/note/saasCompany/query-account-details', {
        params: data
    }) as Promise<PageDto<AccountDetailDto>>
}

// 长期保基本信息
export const getlongbasemsgapi = async (id: any) => {
    const res = await request.get(`/saas/note/saasCompany/query-period-info/${id}`)
    return res
}

// 长期保账户设置
export const longsetadminapi = async (data: any) => {
    const res = await request.put('/period-insur/client/edit-status-insur', data)
    return res
}

// 长期保获取公司超过65岁投保记录
export const getlongoveragelistapi = async (id: any) => {
    const res = await request.get(`/rest/period-insur/staff-record/query-overage-list?companyId=${id}`)
    return res
}

// 长期保减保操作
export const reducelonginsureapi = async (data: any) => {
    const res = await request.post('/rest/period-insur/staff-record/terminal-ensure-overage', data)
    return res
}


// 长期保查看保险信息(方案,加减保次数,减保人数)
export const getlonginsuremsgapi = async (id: any) => {
    const res = await request.get(`/period-insur/client/query-period-info?companyId=${id}`)
    return res
}

// 长期保一键续保按钮
export const onceaddinsureapi = async (data: any) => {
    const res = await request.post('/period-insur/onekey/ensure', data)
    return res
}

// 查看一键续保人员列表
export const lookonceaddinsurelistapi = async (id: any) => {
    const res = await request.get(`/period-insur/onekey/detail?companyId=${id}`)
    return res
}

// 长期保设置超龄人数
export const longinsuresetoveragenumapi = async (data: any) => {
    const res = await request.post('/insur-com-company/insur-com-company/updateAllowOverageEnsure', data)
    return res
}

// 获取公司保险方案列表
export const getcompanyinsuretypeapi = async (data: any) => {
    const res = await request.get(`/insur/InsurComCompanyPlans/list?pageNum=${data.pageNum}&pageSize=${data.pageSize}&companyId=${data.companyId}&isDelete=0&isAllowedRepeat=${data.isAllowedRepeat}&isCompanyAllowedRepeat=${data.isCompanyAllowedRepeat}&allowedDetermineStatus=${data.allowedDetermineStatus}&isEnd=${data.isEnd}&searchBeginTime=${data.searchBeginTime}&searchEndTime=${data.searchEndTime}`)
    return res
}

// 获取加减保记录
export const addlonginsurehistorylistapi = async (data: any) => {
    const res = await request.get(`/period-insur/operate-record/list?companyId=${data.companyId}&pageSize=${data.pageSize}&pageNum=${data.pageNum}&beginInsureDay=${data.beginInsureDay}&endInsureDay=${data.endInsureDay}`)
    return res
}

// 查看保单详情
export const checkinsureguaranteeslipdetapi = async (data: any) => {
    const res = await request.get(`/period-insur/operate-record/detail?operateRecordId=${data.operateRecordId}&pageNum=${data.pageNum}&pageSize=${data.pageSize}`)
    return res
}
// 获取方案信息
export const getinsureplanmsgapi = async (id: any) => {
    const res = await request.get(`/insur/InsurComCompanyPlans/${id}`)
    return res
}

// 修改方案
export const changeinsureplanapi = async (data: any) => {
    const res = await request.put('/insur/InsurComCompanyPlans', data)
    return res
}

// 删除方案
export const delinsurecomapnyplanapi = async (id: any) => {
    const res = await request.delete(`/insur/InsurComCompanyPlans/${id}`)
    return res
}

// 查看活动方案列表
export const getinsureplanactivitylistapi = async (data: any) => {
    const res = await request.get(`/com-insur/company-plans-record/activity-list?plansId=${data.plansId}`)
    return res
}

// 修改活动方案
export const changeinsureplanactivityapi = async (data: any) => {
    const res = await request.put('/com-insur/company-plans-record/edit-activity', data)
    return res
}

// 新增公司方案活动
export const addinsureplanactivityapi = async (data: any) => {
    const res = await request.put('/com-insur/company-plans-record/insert-activity', data)
    return res
}

// 查询投保人员列表
export const getbuyinsurepeoplelistapi = async (data: any) => {
    const res = await request.get(`/period-insur/staff-record/list?pageNum=${data.pageNum}&pageSize=${data.pageSize}&companyId=${data.companyId}&insurCompany=${data.insurCompany}&insurStartTime=${data.insurStartTime}&insurEndTime=${data.insurEndTime}&isDelete=${data.isDelete}&companyPlanName=${data.companyPlanName}&serveCompanyName=${data.serveCompanyName}&userName=${data.userName}&idCardNo=${data.idCardNo}&occupationLevel=${data.occupationLevel}&occupationOriginLevel=${data.occupationOriginLevel}&policyStatus=${data.policyStatus}&isMonthMode=${data.isMonthMode}`)
    return res
}

// 获取发票信息
export const getfapiaomsgapi = async (data: any) => {
    const res = await request.get(`/saas/invoice/query-invoice?type=${data.type}&month=${data.month}&companyId=${data.companyId}`)
    return res
}

// 按月份导出发票
export const getinvoiceapi = async (data: any) => {
    const res = await request.get(`/saas/invoice/export?type=${data.type}&month=${data.month}&status=${data.status}&companyName=${data.companyName}`)
    return res
}

// 上传发票
export const uploadinvoiceapi = async (data: any) => {
    const res = await request.post(`/saas/invoice/upload?id=${data.id}`, data.file)
    return res
}

// 长期保修改返利状态
export const updatelonginsureflapi = async (data: any) => {
    const res = await request.post('/insur-com-company/insur-com-company/updateRebateStatus', data)
    return res
}

// 日日保查看理赔率
export const getdayRateofclaimapi = async (data: any) => {
    const res = await request.get(`/period-insur/client/get-claim-rete-by-cpyid?companyId=${data.companyId}&queryType=${data.queryType}`)
    return res
}

// 日日保账户设置
export const datinsureadminsetapi = async (data: any) => {
    const res = await request.put('/wesure/client/edit-status', data)
    return res
}

// 获取投保记录列表
export const getRecordofinsuranceapi = async (data: any) => {
    const res = await request.get(`/wesure/wesure-insure-record/insure-group?pageNum=${data.pageNum}&pageSize=${data.pageSize}&companyId=${data.companyId}&beginInsureDay=${data.beginInsureDay}&endInsureDay=${data.endInsureDay}&insureCompanyType=${data.insureCompanyType}`)
    return res
}

// 日日保投保记录单条导出
export const exportdayinsureRecordofinsuranceapi = async (id: any) => {
    const res = await request.get(`/wesure/wesure-insure-record/export?projectId=${id}`)
    return res
}
// 日日保投保记录单条导出
export const cexportdayinsureRecordofinsuranceapi = async (data: any) => {
    const res = await request.get(`/wesure/wesure-insure-record/export?insureCompanyType=${data.insureCompanyType}&beginInsureDay=${data.beginInsureDay}&endInsureDay=${data.endInsureDay}&companyId=${data.companyId}`)
    return res
}
// 日日保投保记录查看详情
export const getdayinsuredetailapi = async (data: any) => {
    const res = await request.get(`/wesure/wesure-insure-record/insure-list?projectId=${data.projectId}`)
    return res
}
// 获取日日保投保详情状态字典
export const getDicts = async (dictType: string) => {
    const res = await request.get(`/system/dict/data/type/${dictType}`)
    return res
}

// 获取团意保产品信息
export const gettybbasemsgapi = async (data: any) => {
    const res = await request.get(`/saas/note/saasCompany/query-tyx-info?companyId=${data.companyId}`)
    return res
}

// 获取所有待审批数量
export const getPendingreviewnumapi = async () => {
    const res = await request.get('/saas/note/saasCompany/need-audit-count')
    return res
}

// 获取头部总理赔率等信息
export const gettopRateofclaimmsgapi = async (type: number | string) => {
    const res = await request.get(`system/info/totalRate?type=${type}`)
    return res
}

// 派遣单位维度长期保理赔率列表
export const getlonginsureRateofclaimlistapi = async (data: any) => {
    const res = await request.get(`/system/info/insur-com-serve-co-period?type=${data.type}&pageSize=${data.pageSize}&pageNum=${data.pageNum}&status=${data.status}&claimRateQuery=${data.claimRateQuery}&name=${data.name}`)
    return res
}

// 派遣单位维度日日保理赔率列表
export const getdayinsureRateofclaimlistapi = async (data: any) => {
    const res = await request.get(`/system/info/list?insureCompanyType=insure002_gsc&type=${data.type}&pageSize=${data.pageSize}&pageNum=${data.pageNum}&status=${data.status}&claimRateQuery=${data.claimRateQuery}&name=${data.name}`)
    return res
}
// 派遣单位维度团意保理赔率列表
export const gettyrbinsureRateofclaimlistapi = async (data: any) => {
    const res = await request.get(`/system/info/list?insureCompanyType=wesure004_rb&type=${data.type}&pageSize=${data.pageSize}&pageNum=${data.pageNum}&status=${data.status}&claimRateQuery=${data.claimRateQuery}&name=${data.name}`)
    return res
}

// 派遣单位维度长期保理赔率导出
export const exportlonginsureRateofclaimapi = async (data: any) => {
    const res = await request.get('/system/info/insur-com-serve-co-period-export', {
        params: data
    })
    return res
}

// 派遣单位维度日日保理赔率导出
export const exportdayinsureRateofclaimapi = async (data: any) => {
    const res = await request.get('/system/info/export', {
        params: data
    })
    return res
}

// 派遣单位维度团意保理赔率导出
export const exporttyrbinsureRateofclaimapi = async (data: any) => {
    const res = await request.get('/system/info/export', {
        params: data
    })
    return res
}

// 长期保拒保该派遣单位
export const refuselongservicecompanynameapi = async (data: any) => {
    const res = await request.post('/rest/period-insur/serve-company/refused-insure-period', data)
    return res
}
// 日日保派遣单位维度拒保
export const refusedayservicecompanynameapi = async (data: any) => {
    const res = await request.put('/admin/company/refused-insure-wesure', data)
    return res
}

// 日日保梯度列表
export const getdayinsuregradientapi = async (data: any) => {
    const res = await request.get(`/com/strategy/list-grads?pageNum=${data.pageNum}&pageSize=${data.pageSize}&name=${data.name}`)
    return res
}

// 新增梯度设置
export const adddayinsuregradientapi = async (data: any) => {
    const res = await request.post('/com/strategy/save-grads', data)
    return res
}

// 修改梯度设置
export const changedayinsuregradientapi = async (data: any) => {
    const res = await request.put('/com/strategy/grads/', data)
    return res
}

// 删除梯度设置
export const deldayinsuregradientapi = async (id: any) => {
    const res = await request.delete(`/com/strategy/${id}`)
    return res
}

// 发票列表
export const getallinvoicelistapi = async (data: any) => {
    const res = await request.get('/saas/invoice/list', {params: data})
    return res
}

// 查询保险返佣月统计列表
export const getinsurerebateconditionapi = async (data: any) => {
    let res = ''
    if (data.companyId === null) {
        res = await request.get(`/period-insur/month-rebate-detail/list-voucher?pageNum=${data.pageNum}&pageSize=${data.pageSize}&ensureMonth=${data.ensureMonth}&rebateStatus=${data.rebateStatus}`)
    } else {
        res = await request.get(`/period-insur/month-rebate-detail/list-voucher?pageNum=${data.pageNum}&pageSize=${data.pageSize}&companyId=${data.companyId}&ensureMonth=${data.ensureMonth}&rebateStatus=${data.rebateStatus}`)
    }
    return res
}

// 按月导出返利数据
export const exportflsj = async (data: any) => {
    let res: any = null
    if (data.companyId === null) {
        res = await request.get(`/period-insur/month-rebate-detail/export-contrast-insure-data-month?rebateStatus=${data.rebateStatus}&ensureMonth=${data.ensureMonth}`)
    } else {
        res = await request.get(`/period-insur/month-rebate-detail/export-contrast-insure-data-month?rebateStatus=${data.rebateStatus}&ensureMonth=${data.ensureMonth}&companyId=${data.companyId}`)
    }
    return res
}

// 根据公司按月导出返利数据
export const companyexportflsj = async (data: any) => {
    const res = await request.post(`/period-insur/month-rebate-detail/export-contrast-insure-data?companyId=${data.companyId}&ensureMonth=${data.ensureMonth}`)
    return res
}

// 批量撤销异常
export const Batchundoexceptionapi = async (data: any) => {
    const res = await request.put('/saas/invoice/update-check-status', data)
    return res
}

// 导入开票公司
export const exportopeninvoiceapi = async (data: any) => {
    const res = await request.post('/saas/invoice/import-open-company', data)
    return res
}

// 撤销已上传发票
export const revocationtopeninvoiceApi = async (data: {
    ids: number[]
}) => {
    const res = await request.put('saas/invoice/cancel-invoice-upload', data)
    return res
}

// 返费结算/上传凭证
export const ffjsapi = async (data: any) => {
    const res = await request.post('/period-insur/month-rebate-record/rebate-voucher-upload', data)
    return res
}

// 修改小程序角色
export const changeminiapproleapi = async (data: any) => {
    const res = await request.post('/pay/pay-manager-user/set-admin', data)
    return res
}

// 修改pc角色
export const changepcroleapi = async (data: any) => {
    const res = await request.post('/system/user/change-pc-user-role', data)
    return res
}

// 日日保导出客户列表(客户-客户管理-导出日日保投保客户信息
export const exportdaykhlbapi = async (data: any) => {
    const res = await request.get('/wesure/client/export-list', {params: data})
    return res
}

// 长期保导出客户列表(客户-客户管理-导出长期保投保客户信息)
export const exportlongkhlbapi = async (data: any) => {
    const res = await request.get('/period-insur/ensure-cost-log/exportClientList', {params: data})
    return res
}

// 日日保导出保险详单(客户-客户管理-导出日日保详单)
export const exportdaybxxdapi = async (data: any) => {
    const res = await request.get('/wesure/client/export', {params: data})
    return res
}
// 长期保导出保险详单(客户-客户管理-导出长期保投保客户信息)
export const exportlongbxxdapi = async (data: any) => {
    const res = await request.get('/period-insur/ensure-cost-log/exportClientCost', {params: data})
    return res
}

// 导出客户账户明细(客户-客户管理-客户详情-子弹发薪-账户明细-导出)
export const cexportaccountdetailsapi = async (data: any) => {
    const res = await request.get('/saas/note/saasCompany/export-account-details', {params: data})
    return res
}
export const exportaccountdetailsapi = async (data: any) => {
    const res = await request.get(`/saas/note/saasCompany/export-account-details?companyId=${data.companyId}&productType=${data.productType}&type=${data.type}&payMode=${data.payMode}&startTime=${data.startTime}&endTime=${data.endTime}`)
    return res
}

// 导出长期保方案列表(客户-客户管理-客户详情-长期保-保险方案)
export const InsurComCompanyPlansexportapi = async (data: any) => {
    const res = await request.get(`/insur/InsurComCompanyPlans/export?companyId=${data.companyId}&isDelete=0`)
    return res
}

// 导出长期保投保人员列表(客户-客户管理-客户详情-长期保-投保人员)
export const staffrecordexportapi = async (data: any) => {
    const res = await request.get(`/period-insur/staff-record/export?companyId=${data.companyId}&serveCompanyName=${data.serveCompanyName}&userName=${data.userName}&idCardNo=${data.idCardNo}&insurCompany=${data.insurCompany}&occupationLevel=${data.occupationLevel}&occupationOriginLevel=${data.occupationOriginLevel}&policyStatus=${data.policyStatus}&insurStartTime=${data.insurStartTime}&insurEndTime=${data.insurEndTime}&isMonthMode=${data.isMonthMode}&isDelete=${data.isDelete}&companyPlanName=${data.companyPlanName}&queryStartDate=${data.queryStartDate}&queryEndDate=${data.queryEndDate}`)
    return res
}

// 导出长期保在保人员(客户-客户管理-客户详情-长期保-投保人员-导出在保人员)
export const inwarrantystaffexportapi = async (params: any) => {
    const res = await request.get('/period-insur/staff-record/in-warranty-staff-export', {params: params})
    return res
}

// 导出长期保在保证明ex(客户-客户管理-客户详情-长期保-投保人员)
export const inwarrantyprovedexportapi = async (params: any) => {
    const res = await request.get('/period-insur/staff-record/in-warranty-proved-export', {params: params})
    return res
}

// 导出长期保在保证明PDF(客户-客户管理-客户详情-长期保-投保人员
export const inwarrantyprovedexportpdfapi = async (params: any) => {
    const res = await request.get('/period-insur/staff-record/in-warranty-proved-export-pdf', {params: params})
    return res
}

// 导出长期保保单详情(客户-客户管理-客户详情-长期保-加减保记录-详情
export const operatestaffexportapi = async (operateRecordId: any) => {
    const res = await request.get(`/period-insur/operate-record/operate-staff-export?operateRecordId=${operateRecordId}`)
    return res
}

// 导出客户发票全部列表(客户-客户管理-客户详情-长期保-发票详情-全部-已上传)
export const invoiceexportallapi = async (data: any) => {
    const res = await request.get('/saas/invoice/export', {params: data})
    return res
}

// 导出充值审批(客户-审批管理-充值审批)
export const exportrechargeapi = async (data: {
    companyName?: string,
    productType?: string | number,
    status?: string | number,
    queryStartDate?: string,
    queryEndDate?: string
}) => {
    const res = await request.get('/saas/note/saasCompany/export-recharge', {params: data})
    return res
}

// 获取某销售下的签单信息
export const getproductbysaleapi = async (id: any) => {
    const res = await request.get(`/crm/deal/product-by-sale?saleId=${id}`)
    return res
}

// 离职继承签单分配
export const changedealallocateapi = async (data: any) => {
    const res = await request.post('/crm/deal/deal-allocate', data)
    return res
}

// 查询离职人员
export const getdmslistapi = async (data: any) => {
    const res = await request.get('/crm/sales/dms-list', {params: data})
    return res
}

// 根据销售id获取分配记录信息
export const getallocaterecordapi = async (data: any) => {
    const res = await request.get('/crm/deal/allocate-record', {params: data})
    return res
}

// 长期保保司列表
export const getquerywesureinsurancecompanyapi = async () => {
    const res = await request.get('/insur/insurComInsuranceCompany/query-wesure-insurance-company')
    return res
}

// 长期保保司列表
export const getquerytyxinsurancecompanyapi = async () => {
    const res = await request.get('/insur/insurComInsuranceCompany/query-tyx-insurance-company')
    return res
}

// 查询长期保险投保人员名单列表
export const getstaffrecordlistapi = async (data: any) => {
    const res = await request.get('/period-insur/staff-record/list', {params: data})
    return res
}

// 查询日日保险投保人员名单列表
export const getdaywesureinsurerecordinsurelistapi = async (data: any) => {
    const res = await request.get('/wesure/wesure-insure-record/insure-list', {params: data})
    return res
}

// 查询团意保险投保人员名单列表
export const gettybwesureinsurerecordinsurelistapi = async (data: any) => {
    const res = await request.get('/wesure/wesure-insure-record/insure-list', {params: data})
    return res
}

// 工具-推广海报
export const getsalesapplyinfoapi = async () => {
    const res = await request.get('/crm/salesCustom/sales-apply-info')
    return res
}

// 首页-实时数据
export const getcrmpaysalarystatisticsapi = async () => {
    const res = await request.get('/statistics/crm-pay-salary-statistics')
    return res
}
// 首页-运营数据
export const getcrmoperatestatisticsapi = async () => {
    const res = await request.get('/statistics/crm-operate-statistics')
    return res
}

// 首页-成员信息
export const getcrmteaminfoapi = async () => {
    const res = await request.get('/statistics/crm-team-info')
    return res
}

// 任务进度
export const gettaskscheduleapi = async (data: any) => {
    const res = await request.get('/system/sales/task/get-task-schedule', {params: data})
    return res
}

// 总业绩排行榜
export const getqueryrankinglistallapi = async (data: any) => {
    const res = await request.get('/crm/record/query-ranking-list-all', {params: data})
    return res
}
// 长期保进步榜排行榜
export const getqueryrankinglistinsurapi = async (data: any) => {
    const res = await request.get('/crm/record/query-ranking-list-insur', {params: data})
    return res
}

// 新增总业绩额增长排行榜
export const getqueryriserankinglistallapi = async (data: any) => {
    const res = await request.get('/crm/record/query-rise-ranking-list-all', {params: data})
    return res
}
// 根据登录人获取销售人员数据
export const querySalesRole = async (data: any) => {
    const res = await request.get('/crm/sales/query-sales-role', {params: data, noLoading: true, noCancel: true})
    return res
}


// 首页获取消息
export const getmessagelistapi = async (data: any) => {
    const res = await request.get('/saas/message/list', {params: data})
    return res
}

// 快捷中心-客户池
export const getqueryallcompanyapi = async (data: any) => {
    const res = await request.get('/crm/record/query-all-company', {params: data})
    return res
}

// 日保账户提现
export const withdrawaccountbalance = async (data: any) => {
    const res = await request.put('/saas/note/saasCompany/withdraw-account-balance', data)
    return res
}

// 长期保提现
export const periodwithdrawaccountbalance = async (data: any) => {
    const res = await request.put('/saas/note/saasCompany/period-withdraw-account-balance', data)
    return res
}

// 长期保查询明天扣费情况
export const getqueryTomorrowEnsureCostapi = async (data: any) => {
    const res = await request.get('period-insur/client/queryTomorrowEnsureCost', {params: data})
    return res
}

// 团意日保信息修改
export const putsaasCompanyapi = async (data: any) => {
    const res = await request.put('/saas/note/saasCompany', {params: data})
    return res
}

// 获取团意日保保司
export const getqueryinsurancecompanyapi = async () => {
    const res = await request.get('/insur/insurComInsuranceCompany/query-insurance-company', {params: {type: 3}})
    return res
}

// 获取公司信息
export const getcompanyallmsgapi = async (data: any) => {
    const res = await request.get(`saas/note/operator/info?companyId=${data}`)
    return res
}

// 修改团意日保信息
export const addoredittyInsurapi = async (data: any) => {
    return await request.post('saas/note/saasCompany/add-or-edit-tyInsur', data)
}


// 渠道商信息
export const openapiaccountcustomerapi = async () => {
    const res = await request.get('/saas/note/saasCompany/open-api-account-customer')
    return res
}

// 席位信息
export const getcompanyseatinfoapi = async (data: any) => {
    const res = await request.get('/pay/pay-company-seat/company-seat-info', {params: data})
    return res
}

// 席位分配
export const setcoseatapi = async (data: any) => {
    const res = await request.put('/pay/pay-manager-user/set-co-seat', data)
    return res
}

export const updateperiodoverdraftamount = async (data: any) => {
    const res = await request.put('/wesure/account-balance/update-period-overdraft-amount', data)
    return res
}

// 查询销售信息
export const getqueryreceiptaccountapi = async (data: any) => {
    const res = await request.get('/crm/sales/query-receipt-account', {params: data})
    return res
}

// 导出客户方案消费记录
export const exportcostapi = async (data: any) => {
    const res = await request.get('/period-insur/record/export-cost', {params: data})
    return res
}

// 导出客户消费记录
export const exportRecordsListapi = async (data: any) => {
    const res = await request.get('/period-insur/ensure-cost-log/exportRecordsList', {params: data})
    return res
}

// 日日保，团意保导出投保记录
export const wesureinsurerecordexportapi = async (data: any) => {
    const res = await request.get('/wesure/wesure-insure-record/export', {params: data})
    return res
}

// 实时数据接口
export const getqueryyesterdayinsureinfolistapi = async (data: any) => {
    const res = await request.get('/crm/record/query-yesterday-insure-info-list', {params: data})
    return res
}

// 修改crmPc登录密码
export const updatecrmloginpwdapi = async (data: any) => {
    const res = await request.post('/system/user/update-crm-login-pwd', data)
    return res
}

// 日保报案数据汇总
export const summarizingwesurereportcasedataapi = async (data: any) => {
    const res = await request.get('/wesure/wesure-report-case/summarizing-wesure-report-case-data', {params: data})
    return res
}

// 长期保报案数据汇总
export const summarizinginsurreportcasedataapi = async (data: any) => {
    const res = await request.get('/period-insur/report-case/summarizing-insur-report-case-data', {params: data})
    return res
}

// 删除长期保案件经过
export const deldescapi = async (data: any) => {
    const res = await request.delete(
        'period-insur/report-case-result/delete/' + data.id,
    )
    return res
}

// 删除日日保案件经过
export const deldescdayapi = async (data: any) => {
    const res = await request.delete(
        'wesure/wesure-report-case/wesure-report-case-result/delete/' + data.id,
    )
    return res
}

// 查询商务列表
export const getsaleapi = async (data: any) => {
    const res = await request.get(
        '/crm/sales/query-sales-list', {params: data}
    )
    return res
}

// 修改B端手机号 / 头像信息
export const PayManagerUserApi = async (data: any) => {
    const res = await request.put(
        '/pay/pay-manager-user', data
    )
    return res
}

// 修改Crm小程序申请状态
export const editCrmInfoApi = async (data: any) => {
    const res = await request.put(
        '/crm/sales/edit-crm-info', data
    )
    return res
}

// 修改Crm小程序申请状态
export const getAddUserListApi = async (data: any) => {
    const res = await request.get(
        'crm/sales/list', {params: data}
    )
    return res
}

// 修改派遣单位地址
export const editPeriodServeCompanyApi = async (data: any) => {
    const res = await request.put(
        '/period-insur/serve-company/edit-period-serve-company', data
    )
    return res
}

// 开通记账本
export const alipayAccountApi = async (data: any) => {
    const res = await request.post(
        '/alipay/account', data
    )
    return res
}

// 获取日保方案价格
export const getInsurComCompanyPlansDailyListApi = async (data: any) => {
    const res = await request.get(
        '/insur/InsurComCompanyPlans/daily/list', {params: data}
    )
    return res
}

// 修改日日保方案价格
export const updateDayInsurePriceApi = async (data: any) => {
    const res = await request.put(
        '/insur/InsurComCompanyPlans/daily', data
    )
    return res
}

// 修改日日保方案价格
export const revokeStaffApi = async (data: any) => {
    const res = await request.post(
        '/rest/period-insur/staff-record/revoke-staff', data
    )
    return res
}

// 导出阳光客户列表
export const exportYgCustomerApi = async (data: any) => {
    const res = await request.get(
        '/saas/note/saasCompany/export-yg-customer', {params: data}
    )
    return res
}

export interface QueryOpenAccountDto {
    id?: number | string;
    source?: number;
    companyName?: string;
    companyAbbreviation?: null;
    creditCode?: string;
    merchantBankCard?: null;
    auditStatus?: number;
    legalPerson?: null | string;
    area?: null | string;
    subMchid?: null;
    dailyQuota?: null;
    personSingleQuota?: null;
    createTime?: string;
    openAnAccountTime?: string;
    isOpenSalaryCard?: number;
    isOpenPaySalary?: number;
    isOpenWesure?: number;
    isOpenPayRepeatReminder?: null | number;
    isNeedAuthSalaryCard?: null | number;
    isOpenZp?: number;
    balanceRemind?: null | number;
    insureCompanyType?: null | string;
    qyWxQrcodeId?: null | number;
    bookSubUnit?: null;
    qyWxQrcodeUrl?: null;
    isWesureUser?: number;
    createUserId?: number;
    updateTime?: string;
    updateUserId?: null | number;
    ids?: null;
    expirationDate?: null;
    wesureBalance?: null;
    insureTypeList?: null;
    isOpenPeriod?: null;
    periodCompanyTypeList?: null;
    periodPlanTypeList?: null;
    periodPlanTypeNameList?: null;
    insureType?: null | string;
    policyPeopleCount?: null;
    policyCount?: null;
    wesureType?: null;
    wesureTypeName?: string;
    isOpenEleSign?: number;
    signInMode?: number;
    salesName?: null;
    params?: Params;
    payAccountRechargeRecords?: null;
    rechargeMonthNumber?: number;
    accountExpireTime?: string;
    accountOpeningFee?: null;
    validTime?: null;
    employeeLibrary?: null;
    receiptId?: null;
    bankName?: null;
    isOpenTyrbStatus?: null;
    insurCompany?: null;
    channelId?: null;
    channelName?: null;
    businessLicenseAddress?: null | string;
    queryDate?: null;
    productType?: null;
    bySeatCount?: null;
    status?: null;
    companyNameList?: null;
    notLikeCompanyName?: null;
    accountLimit?: null;
    operatorName?: null;
    operatorIdCard?: null;
    contact?: null;
    isAgent?: null;
    isOpenAlipay?: null;
    isOpenWechatPay?: null;
    openQrProjectEnsure?: null;
    wxAccountBalance?: null;
    alipayAccountBalance?: null;
    openWesure?: boolean;
    openEleSign?: boolean;
}

interface Params {
    phone: string;
    userName: string;
    userHeadUrl: string;
}

// 获取渠道来源列表
export const getQueryOpenAccountApi = async (): Promise<QueryOpenAccountDto[]> => {
    return await request.get('/saas/note/saasCompany/query-open-account')
}
